﻿@model Kooboo.CMS.Web.Areas.Membership.Models.EditMembershipUserModel
@{
    ViewBag.Title = "Edit member".Localize();
    Layout = "~/Views/Shared/Blank.cshtml";
}
@section Panel{
    <ul class="panel">
        <li>
            <a data-ajaxform="">
                @Html.IconImage("save") @("Save".Localize())
            </a>
        </li>
        @foreach (var group in Kooboo.CMS.Sites.Extension.UI.TopToolbar.ToolbarButtons.GetToolbarButtons(ViewContext.RequestContext))
        {
            @Html.Partial("_ToolbarGroupButtons", group)
        }
        <li>
            <a href="@ViewContext.RequestContext.GetRequestValue("return")">
                @Html.IconImage("cancel") @("Back".Localize())
            </a>
        </li>
    </ul>
}
<div class="common-form">
    <h1 class="title">@ViewBag.Title</h1>
    @using (Html.BeginForm())
    {
        @Html.ValidationSummary(true)
        <input type="hidden" name="UserName" value="@Model.UserName" />
        <input type="hidden" name="Email" value="@Model.Email" />
        <table>
            <tbody>
                @Html.DisplayFor(m => m.UserName, new { HtmlAttributes = new { @class = "medium" } })
                @Html.DisplayFor(m => m.Email, new { HtmlAttributes = new { @class = "medium" } })
                @if (string.IsNullOrEmpty(Model.ProviderType))
                {
                    @Html.EditorFor(m => m.PasswordQuestion, new { HtmlAttributes = new { @class = "medium" } })
                    @Html.EditorFor(m => m.PasswordAnswer, new { HtmlAttributes = new { @class = "medium" } })
                }
                @Html.EditorFor(m => m.IsApproved)
                @Html.EditorFor(m => m.IsLockedOut)
                @Html.EditorFor(m => m.Culture, new { HtmlAttributes = new { @class = "medium" } })
                @Html.EditorFor(m => m.TimeZoneId, new { HtmlAttributes = new { @class = "medium" } })
                @Html.EditorFor(m => m.MembershipGroups, new { HtmlAttributes = new { @class = "medium" } })
                @Html.EditorFor(m => m.Profiles)
                @Html.EditorFor(m => m.Comment, new { HtmlAttributes = new { @class = "large" } })

                @if (!string.IsNullOrEmpty(Model.ProviderType))
                {
                    @Html.DisplayFor(m => m.ProviderType, new { HtmlAttributes = new { @class = "medium" } })
                    @Html.DisplayFor(m => m.ProviderUserId, new { HtmlAttributes = new { @class = "medium" } })
                    @Html.DisplayFor(m => m.ProviderExtraData)
                }
            </tbody>
        </table>
    }
</div>
